<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="./inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="选择日期" />
<%@ include file="./inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<link href="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.css" rel="stylesheet" type="text/css">
<script src="/js/popup_ext.js"></script>
<script src="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.js"></script>
<script language="javascript">
	function checkInput(){
		if(window.event.keyCode==13){
			doOk();
		}
	}
	function doOk(){
		var dateStr=document.getElementById("date_str").value;
		if(dateStr==null || dateStr==''){
			ShowAlert('提示框','请选择日期',200,100);
		}else{
			var arr=dateStr.split("-");
			if(arr.length==null || arr.length!=3){
				ShowAlert('提示框','日期格式不正确',200,100);
			}else if(isNaN(arr[0]) || isNaN(arr[1]) || isNaN(arr[2])){
				ShowAlert('提示框','日期格式不正确',200,100);
			}else{
				parent.popRetVal=dateStr;
				parent.ClosePop();
			}
		}
	}
	function doCancel(){
		parent.ClosePop();
	}
</script>
</head>
<body oncontextmenu="return false"  class="sheet modal-dialog" style=" padding-top:15px;">
<div class="sheet-main" style="width:275px;">
	<form name="frm" method="post">
	  <div class="sheet-list" >
	    <div class="modal-main search-business">
	    	<div style="width:100%;">
				<c:set var="pageTopTitle" value="${title}" />
				<c:set var="pageTopMark" value="" />
				<%@ include file="inc/PageTop.jsp"%>
				<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-a" id="cale_posi">
						<tr>
							<th>${label}：</th>
							<td>
					    		<input type="text" class="TextBox Datetime" maxlength="15" onKeyUp="checkInput();" id="date_str" name="date_str" value="<fmt:formatDate value="${currentDate}" pattern="yyyy-MM-dd"/>">
								<img src="/images/calendar.gif" style="cursor:pointer" onClick="displayCalendar(document.getElementById('date_str'),'yyyy-mm-dd',document.getElementById('cale_posi'));">
							</td>
						</tr>
				</table>
			</div>
	  	</div>
	  </div>
		<div class="modal-buttom">
			<input type="button" class="buttom-a" value=" 确 定 " onClick="doOk();">
			<input type="button" class="buttom-a" value=" 取 消 " onClick="doCancel();">
		</div>
	</form>
</div>			   	
</body>
</html>